class CommentsController < ApplicationController
  before_filter :login_required
  
  def create
    @revision = Revision.find(params[:revision_id])
    @comment = @revision.comments.build(params[:comment])
    @comment.user_id = current_user.id
    @comment.save
    respond_to do |wants|
      wants.html { redirect_to @revision.page }
      wants.js # create.js.rjs
    end
  end
end